<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:p="http://primefaces.prime.com.tr/ui">
<ui:composition template="../comum/template.xhtml">
	<ui:define name="conteudo">
	 <h:form styleClass="central">
	 	<rich:panel >		
			 <f:facet name="header">
			
			 	<h:outputText value="Inserir HotSpot" />
			
			 </f:facet>
			 <rich:select defaultLabel="Selecione o Layer..." value="#{InserirHotSpot.layer.id}" >
			 	<f:selectItems value="#{InserirHotSpot.listaLayer}" itemValue="#{layer.id}" var="layer" itemLabel="#{layer.layer}" />
			 </rich:select>
			 <p:spacer height="15"></p:spacer>
			<rich:tabPanel switchType="client">
			<rich:tab >
				<f:facet name="header">
            		<h:outputText value="config" />
      			</f:facet>
			 <h:panelGrid id="gridTipo" columns="2" cellspacing="40" >
			 	<h:outputText value="Tipo:" />
				<h:selectOneRadio value="#{InserirHotSpot.radioTipo}">
					<f:selectItem itemLabel="GeoLocalizado" itemValue="GeoLocalizado"/>
					<f:selectItem itemLabel="Imagem" itemValue="Imagem" />
					<f:ajax event="change" render="gridTipo" listener="#{InserirHotSpot.definirTipo}" />
				</h:selectOneRadio>
				<p:outputPanel binding="#{InserirHotSpot.outPutPanelImagem}"><h:outputText value="Referencia Imagem:" /></p:outputPanel><p:inputText binding="#{InserirHotSpot.referenciaImagem}" size="30" />
				
				<p:outputPanel binding="#{InserirHotSpot.outPutPanelGeolocation}"><h:outputText value="Geolocalização" /></p:outputPanel><p:gmap id="map" binding="#{InserirHotSpot.map}"
																model="#{InserirHotSpot.model}" 
																center="#{InserirHotSpot.center}" 
																zoom="13" type="HYBRID"   
           														style="width:400px;height:300px"    
            													pointSelectListener="#{InserirHotSpot.onPointSelect}"   
            													onPointSelectUpdate="map"/>  
            	<h:outputText value="Indexar? " /><h:selectBooleanCheckbox value="#{InserirHotSpot.indexar}"/>
            	<h:outputText value="Em Foco? " /><h:selectBooleanCheckbox value="#{InserirHotSpot.inFocus}"/>	
            	<h:outputText value="Exibir BIW? " /><h:selectBooleanCheckbox value="#{InserirHotSpot.showSmallBIW}"/>	
            	<h:outputText value="Exibir BIW no Click? " /><h:selectBooleanCheckbox value="#{InserirHotSpot.showBiwOnClick}"/>	
            	<h:outputText value="BIW Style: " /><rich:inplaceSelect value="#{InserirHotSpot.biwStyle}" >  <f:selectItem itemValue="classic" itemLabel="classic"/><f:selectItem itemValue="collapsed" itemLabel="collapsed"/></rich:inplaceSelect>										
		   </h:panelGrid>
		   </rich:tab>
		   <rich:tab>
		   <f:facet name="header">
            	<h:outputText value="Texto" />
      		</f:facet>
			 <h:panelGrid id="gridTexto" columns="4" cellspacing="40" >			 	
				<h:outputText value="Titulo: " /><p:inputText value="#{InserirHotSpot.titulo}" size="30" />
				<h:outputText value="Descrição: " /><p:inputText value="#{InserirHotSpot.descricao}" size="30" />
				<h:outputText value="Rodapé: " /><p:inputText value="#{InserirHotSpot.rodape}" size="30" />
				<h:outputText value="Imagem: " /><p:fileUpload fileUploadListener="#{InserirHotSpot.uploadImagem}" allowTypes="jpg,gif,png" ></p:fileUpload> 
		   </h:panelGrid>
		   </rich:tab>
		   <rich:tab >
		   <f:facet name="header">
            		<h:outputText value="Objeto" />
      			</f:facet>
			<h:panelGrid id="gridObjeto" columns="4" cellspacing="40" > 
			    <h:outputText value="Tipo: " /><rich:inplaceSelect value="#{InserirHotSpot.tipoObjeto}" >  <f:selectItem itemValue="imagem" itemLabel="imagem"/><f:selectItem itemValue="modelo" itemLabel="modelo"/></rich:inplaceSelect>
			 	<h:outputText value="Objeto: " /><p:fileUpload fileUploadListener="#{InserirHotSpot.uploadObjeto}" allowTypes="jpg,gif,png,l3d" ></p:fileUpload>
			 	<h:outputText value="Objeto Reduzido: " /><p:fileUpload fileUploadListener="#{InserirHotSpot.uploadObjetoReduzido}" allowTypes="jpg,gif,png,l3d" ></p:fileUpload>
			 	<h:outputText value="tamanho: " /><rich:inputNumberSpinner value="#{InserirHotSpot.tamanho}" maxValue="10"></rich:inputNumberSpinner>
		   </h:panelGrid>
		   </rich:tab>
		   <rich:tab >
		   <f:facet name="header">
            		<h:outputText value="Transform" />
      			</f:facet>
			 <h:panelGrid id="gridTransform" columns="2" cellspacing="40" >
			 	<h:outputText value="Escala: " /><rich:inputNumberSpinner value="#{InserirHotSpot.escala}" maxValue="10"></rich:inputNumberSpinner>
			 	<h:outputText value="Rotate: " /><p:separator></p:separator>
			 	<h:outputText value="Eixo x: " /><rich:inputNumberSpinner value="#{InserirHotSpot.rotateX}" maxValue="10"></rich:inputNumberSpinner>
			 	<h:outputText value="Eixo y: " /><rich:inputNumberSpinner value="#{InserirHotSpot.rotateY}" maxValue="10"></rich:inputNumberSpinner>
			 	<h:outputText value="Eixo z: " /><rich:inputNumberSpinner value="#{InserirHotSpot.rotateZ}" maxValue="10"></rich:inputNumberSpinner>
			 	<h:outputText value="Angulo: " /><p:outputPanel><p:inputText id="txt3" value="#{InserirHotSpot.angulo}"/><p:slider for="txt3" step="5" maxValue="360"/></p:outputPanel>
			 	<h:outputText value="é Relativo? " /><h:selectBooleanCheckbox value="#{InserirHotSpot.relativo}"/>
			 	<h:outputText value="Translate: " /><p:separator></p:separator>
			 	<h:outputText value="Eixo x: " /><rich:inputNumberSpinner value="#{InserirHotSpot.tranlateX}" maxValue="10"></rich:inputNumberSpinner>
			 	<h:outputText value="Eixo y: " /><rich:inputNumberSpinner value="#{InserirHotSpot.tranlateY}" maxValue="10"></rich:inputNumberSpinner>
			 	<h:outputText value="Eixo z: " /><rich:inputNumberSpinner value="#{InserirHotSpot.tranlateZ}" maxValue="10"></rich:inputNumberSpinner>
		   </h:panelGrid>
		   </rich:tab>
		   <rich:tab>
		   <f:facet name="header">
            	<h:outputText value="Icone" />
      	   </f:facet>
		   <h:panelGrid id="gridIcone" columns="2" cellspacing="40" >
			 	<h:outputText value="Icone" /><p:fileUpload fileUploadListener="#{InserirHotSpot.uploadIcone}" allowTypes="jpg,gif,png,l3d" ></p:fileUpload>
			 	<h:outputText value="Tipo: " /><rich:inputNumberSpinner value="#{InserirHotSpot.tipoIcone}" minValue="0" maxValue="2"></rich:inputNumberSpinner>
		   </h:panelGrid>
		   </rich:tab>
		   </rich:tabPanel>
		   <h:commandButton action="#{InserirHotSpot.cadastrar}" value="Cadastrar" />
		 </rich:panel>
	 </h:form>
	</ui:define>
</ui:composition>

</html>